customize snapcraft environment based on architecture.
Metadata
Current evaluation
No evaluation has been recorded for this issue yet.
Issue body
I'm doing raspberry pi development and use an environment variable to enable/disable a hardware simulator.
When the snap is being deployed into a test (non-arm64) environment I need to set a number of environment variables to enable the simulator and disable the loading of the .so file (the application is java but the hardware interface is in a .so).
I came across the 'on' 'else' keywords and they look perfect for this sort of problem.
I want to be able to write:
apps:
pi-gation:
command: tomcat-launch
daemon: simple
plugs: [network, network-bind]
environment:
on arm64:
PI4J_PLATFORM : RaspberryPi GPIO Provider
else:
PI4J_PLATFORM : Simulated
SimulatedPlatform : RaspberryPi GPIO Provider
Currently the on..else keywords are only supported for the 'stage-packages' key word.
on..else should be supported for setting environment variables.
Possibly the concept should be considered for a number of other properties.
Evaluation history
No evaluation history available.